// 题目：实现一个 sleep函数，比如 sleep(1090)意味着等待1000毫秒,可从 Promise、 Generator、Async/ Await等角度实现

function sleep(ms) {
  return new Promise((resolve) => {
    setTimeout(() => resolve(), ms)
  })
}
let a = 'abc'

;(async () => {
  console.log(111)
  await sleep(1000)
  console.log(222)
})()
